import torch
from torch import nn
from torch.nn import init
net = nn.Sequential(
    nn.Linear(4, 3),
    nn.ReLU(),
    nn.Linear(3, 1)
)

for name, param in net.named_parameters():
    init.normal_(param, mean=0, std=0.01)
    print(name, param.data)


def normal_(tensor, mean, std):
    with no_grad:
        return tensor.normal_(mean, std)


def init_weight_(tensor):
    with torch.no_grad():
        tensor.uniform_(-10, 10)
        tensor *= (tensor.abs() >= 5).float()
